Using the list of the used namespaces

If the current FBD-editor should access →blocks or →data types outside of the current →namespaceno special steps are required. As usual, you create the →calls to such blocks (see "Creating value fields and calls") or you declare the →variable based on the data type (see "Declaring variables in FBD").

Good to know

(grey lightbulb) The specifications that are required for a function block outside of the current namespace are automatically entered by Neuron Power EngineerNeuron Power Engineer inserts the required namespace in tab Namespaces – in particular within the field Used namespaces. Internally, a used namespace corresponds to a USING namespace directive you might know when creating ST-code (see "Namespaces in ST: usage" for more information).

(grey lightbulb) Only, if conflicts would arise due to the same names of function blocks in different namespaces, the fully qualified name is entered for the element. A fully qualified name consists of a sequence of namespace identifiers separated by . (dots). The identifier of the function block concludes the fully qualified name. Example: The fully qualified name is Standard.Counters.CDOWN, if a call of the function block CDOWN has been inserted and CDOWN has been declared within the namespace Standard.Counters.

(grey lightbulb) Functions or data types are always inserted within the FBD-editor by using the fully qualified name.

As Neuron Power Engineer automatically manages the access to elements within a namespace. usually, you do not have to add namespaces or change them afterwards. But Neuron Power Engineer provides some features for a manual intervention anyway:

  • How to add an existing namespace as a used namespace:

  1. In tab Namespaces: Open the context menu for the field Used namespaces and select the command Add namespace...

  2. In the dialog, select the appropriate namespace from the list under Namespace (e.g. Standard.Timers.HighResolution) and click Add.
    Result: The namespace is listed under Used namespaces.

  • How to delete a used namespace: See "Deleting/removing namespaces for a POU".

  • If you prefer to use the fully qualified name for function blocks, it is possible to toggle the usage for elements from the same namespace as follows (this is not possible for →functions).

    1. Make the list of declared variables visible. 

    2. Select the variables/instances in the list.
      Press Ctrl+A to select all elements in the view. Or press and hold the Shift- or the Ctrl-key to select several variables/instances. 

    3. From the context menu, select Toggle Fully Qualified Name of Type. Alternative: Press the Ctrl+Shift+N.
      Impact: The fully qualified name of the elements from the same namespace is displayed in the column Data Type in the list of the declared variables. Example: Standard.Counters.CDOWN

    4. If you want to return to the used namespace again, select Toggle Fully Qualified Name of Type again or press Ctrl+Shift+N again.
      Impact: The name of the namespace of the elements from the same namespace is again displayed in the column Namespace in the list of the declared variables. Example: Standard.Counters

  • It is also possible to toggle the display/usage for data types (in the case of variables) as well.

How to check whether the FBD-editor accesses blocks or data types outside of the current namespace:

  1. Check the column Data Type and/or Namespace within the list of declared variables.
    If a fully qualified name is specified within the column Data Type or a namespace is specified within the column Namespace, this function block or the data type (in case of a variable) is located outside of the current namespace.

  2. Point to the call of a function. If the function is from a namespace, the tooltip displays the fully qualified name.

  3. Check the field Used Namespaces within the tab Namespaces.
    If namespaces are specified, elements from this namespace are used and/or you have added a used namespace yourself.
    (warning) Restriction: If there is a USING instruction within the application navigator, this used namespace is not listed in the field Used Namespaces within the tab Namespaces. Details: See "Assigning USING for accessing a different namespace folder".